home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmMain
- BackColor = &H00FFFFFF&
- Caption = "Generic Form (Toolbar)"
- ClientHeight = 3645
- ClientLeft = 1185
- ClientTop = 2130
- ClientWidth = 5970
- Height = 4335
- HelpContextID = 1
- Icon = TOOLBAR.FRX:0000
- Left = 1125
- LinkTopic = "Form1"
- ScaleHeight = 243
- ScaleMode = 3 'Pixel
- ScaleWidth = 398
- Top = 1500
- Width = 6090
- Begin PictureBox PicClip2
- Height = 480
- Left = 0
- Picture = TOOLBAR.FRX:0302
- ScaleHeight = 450
- ScaleWidth = 1170
- TabIndex = 4
- Top = 0
- Width = 1200
- End
- Begin PictureBox Panel3D2
- Align = 2 'Align Bottom
- Height = 420
- Left = 0
- ScaleHeight = 390
- ScaleWidth = 5940
- TabIndex = 3
- Top = 3225
- Width = 5970
- End
- Begin Timer Timer2
- Enabled = 0 'False
- Interval = 1000
- Left = 0
- Top = 840
- End
- Begin PictureBox Panel3D1
- Align = 1 'Align Top
- Height = 405
- Left = 0
- ScaleHeight = 375
- ScaleWidth = 5940
- TabIndex = 1
- Top = 420
- Visible = 0 'False
- Width = 5970
- Begin PictureBox PicClip1
- Height = 480
- Left = 0
- Picture = TOOLBAR.FRX:15DC
- ScaleHeight = 450
- ScaleWidth = 1170
- TabIndex = 5
- Top = 0
- Width = 1200
- End
- Begin PictureBox Cmd_Button
- Height = 330
- Index = 0
- Left = 120
- ScaleHeight = 300
- ScaleWidth = 300
- TabIndex = 2
- Top = 35
- Width = 330
- End
- End
- Begin PictureBox ToolBar
- Align = 1 'Align Top
- Height = 420
- Left = 0
- ScaleHeight = 390
- ScaleWidth = 5940
- TabIndex = 0
- Top = 0
- Width = 5970
- Begin PictureBox Toolbar_Button
- Height = 360
- Index = 0
- Left = 180
- ScaleHeight = 330
- ScaleWidth = 330
- TabIndex = 6
- Top = 30
- Width = 360
- End
- End
- Begin Timer Timer1
- Left = 0
- Top = 1200
- End
- Begin Menu mnuFile
- Caption = "&File"
- Begin Menu mnu_Exit
- Caption = "&Exit"
- End
- End
- Begin Menu mnuEdit
- Caption = "&Edit"
- Begin Menu mnu_Copy
- Caption = "&Copy"
- End
- End
- Begin Menu mnuHelp
- Caption = "&Help"
- Begin Menu mnu_About
- Caption = "&About"
- End
- End
- Option Explicit
- Dim I As Index
- Sub Form_Load ()
- centerform frmMain
- Dim strpoint As Integer
- strpoint = 1
- strpoint = picclip1.Cols
- Dim I As Integer, ii As Integer
- For I = 0 To 14 - 1
- If I > 0 Then
- Load Toolbar_button(I)
- Toolbar_button(I).Left = Toolbar_button(I - 1).Left + Toolbar_button(I - 1).Width - 1
- Toolbar_button(I).Visible = True
- Toolbar_button(I).PictureUp = picclip1.GraphicCell(I)
- End If
- Next
- For ii = 0 To 9 - 1
- If ii > 0 Then
- Load cmd_button(ii)
- cmd_button(ii).Left = cmd_button(ii - 1).Left + cmd_button(ii - 1).Width - 1
- cmd_button(ii).Visible = True
- cmd_button(ii - 1).Picture = picclip1.GraphicCell(ii + 1)
- End If
- Next
- Timer1.Interval = 1000
- Timer1.Enabled = True
- timer2.Enabled = True
- Toolbar_button(0).Visible = False
- End Sub
- Sub Form_Unload (Cancel As Integer)
- End Sub
- Sub mnu_About_Click ()
- Load frmAbout
- End Sub
- Sub mnu_Exit_Click ()
- End Sub
- Sub Timer1_Timer ()
- Dim T$, tx%
- T = Toolbar_button(tx).Tag
- Dim curhwnd As Integer 'Current hWnd
- Dim p As POINTAPI
- Dim sp As Integer
- Static LasthWnd As Integer
- If GetActiveWindow() = frmMain.hWnd Then
- ' Initialize point structure:
- Call GetCursorPos(p)
-
- curhwnd = WindowFromPoint(p.Y, p.X)
- If curhwnd <> LasthWnd Then
- timer2.Enabled = True
- ' Store the current hWnd:
- LasthWnd = curhwnd
-
- Timer1.Interval = 5
-
- Select Case curhwnd
-
- Case Toolbar.hWnd
- Displayhelp "Toolbar"
- Case Toolbar_button(0).hWnd
- Displayhelp ""
-
- Case Toolbar_button(1).hWnd
- Displayhelp "Button 1"
- Case Toolbar_button(2).hWnd
- Displayhelp "Button 2"
- Case Toolbar_button(3).hWnd
- Displayhelp "Button 3"
- Case Toolbar_button(4).hWnd
- Displayhelp "Button 4"
- Case Toolbar_button(5).hWnd
- Displayhelp "Button 5"
- Case Toolbar_button(6).hWnd
- Displayhelp "Button 6"
- Case Toolbar_button(7).hWnd
- Displayhelp "Button 7"
- Case Toolbar_button(8).hWnd
- Displayhelp "Button 8"
- Case Toolbar_button(9).hWnd
- Displayhelp "Button 9"
- Case Toolbar_button(10).hWnd
- Displayhelp "Button 10"
- Case Toolbar_button(11).hWnd
- Displayhelp "Button 11"
- Case Toolbar_button(12).hWnd
- Displayhelp "Button 12"
- Case Toolbar_button(13).hWnd
- Displayhelp "Button 13"
-
- Case frmHelp.hWnd
- ' If it moves onto the help window, hide it:
- 'frmHelp.Hide
- Case Else
- Displayhelp T$
- Timer1.Interval = 1000
-
- End Select
-
- End If
- End If
- End Sub
- Sub Toolbar_Button_Click (Index As Integer, Value As Integer)
- Select Case Value
- Case True
- Toolbar_button(Index).Value = False
- Case False
- Value = False
- End Select
- End Sub
-